import request from '/@/utils/request';

export function readAllDict(params?: any) {
  return request({
    url: 'dict',
    method: 'get',
    params,
  });
}

export function createDict(data: any) {
  return request({
    url: 'dict',
    method: 'post',
    data,
  });
}

export function updateDict(id: number, data: any) {
  return request({
    url: `dict/${id}`,
    method: 'post',
    data,
  });
}

export function deleteDict(id: number) {
  return request({
    url: `dict/${id}`,
    method: 'delete',
  });
}
